package com.training1.core.common.enums.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;

import com.training1.core.common.enums.EnumValidation;

@Documented
@Target( { ElementType.METHOD, ElementType.FIELD })  
@Retention(RetentionPolicy.RUNTIME)  
@Constraint(validatedBy = {EnumValidation.class} )  
public @interface EnumOnly {

	Class<?>[] groups() default { };
	
	String enumName(); 
	
	String message() default "{common.parameter.error}";
	
	Class<? extends Payload>[] payload() default { };
}
